package com.punch.user.service.impl;


import com.punch.common.model.SysMenu;
import com.punch.common.service.impl.SuperServiceImpl;
import com.punch.user.mapper.SysRoleMenuMapper;
import com.punch.user.model.SysRoleMenu;
import com.punch.user.service.RoleMenuService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zlt
 */
@Slf4j
@Service
public class RoleMenuServiceImpl extends SuperServiceImpl<SysRoleMenuMapper, SysRoleMenu> implements RoleMenuService {

    /**
     * 根据角色id获取菜单
     *
     * @param roleId 角色id
     * @return List<SysMenu>
     */
    @Override
    public List<SysMenu> getMenuListByRoleId(Integer roleId) {
        return getBaseMapper().selectMenuListByRoleId(roleId);
    }
}
